package org.rc.web;

import org.rc.model.Result;

import java.util.List;

/**
 * A bean to represent a page of data sent to the client for infinite scrolling.
 * Created by IntelliJ IDEA.
 * User: dokeeffe
 * Date: 11/02/2012
 * Time: 16:40
 * To change this template use File | Settings | File Templates.
 */
public class InfiniteScrollPage {
    private String cursor;
    private List<Result> elements;

    /**
     * Constructor passed the cursor and dataset
     * @param cursor
     * @param elements
     */
    public InfiniteScrollPage(String cursor, List<Result> elements) {
        this.setCursor(cursor);
        this.setElements(elements);
    }

    /**
     * Get the cursor
     * @return
     */
    public String getCursor() {
        return cursor;
    }

    /**
     * Set the cursor
     * @param cursor
     */
    public void setCursor(String cursor) {
        this.cursor = cursor;
    }

    /**
     * GEt the elements
     * @return
     */
    public List<Result> getElements() {
        return elements;
    }

    /**
     * Set the elements
     * @param elements
     */
    public void setElements(List<Result> elements) {
        this.elements = elements;
    }
}
